package se.oru.soccerpaper.client;

import java.io.BufferedReader;
import java.io.IOException;

public final class ServerListener extends Thread {
	final private BufferedReader fromServer;
	public ServerListener(BufferedReader fromServer) {
		this.fromServer = fromServer;
	}
	public void run() {
		String lineFromServer;
		try {
			while ((lineFromServer = fromServer.readLine()) != null
					&& !lineFromServer.equals("quit")) {
				System.out.println("From server: " + lineFromServer);
			}
		}
		catch (IOException e) {
			System.err.println("viva la fox!");
		}
	} //run
} //class ServerListener
